package cn.kgc.client;

import cn.kgc.commons.vo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: 石浩杰
 * @date: 2022-12-09 10:25
 */
@Component
@Slf4j
public class WmsWareSkuFeignClientFallback implements WmsWareSkuFeignClient{
    @Override
    public Result<Boolean> hasStock(Long skuId) {
        log.warn("获得是否还有库存信息失败:{}",skuId);
        return Result.error(false,"http://mall-wms/wms/WareSku/hasStock", HttpStatus.INTERNAL_SERVER_ERROR.value(), "error:服务降级");
    }
}
